package qingma

import (
	"github.com/gin-gonic/gin"
	"qm_system_server/server/api/v1"
	"qm_system_server/server/middleware"
)

type QmPlatformsRouter struct {
}

// InitQmPlatformsRouter 初始化 qmPlatforms表 路由信息
func (s *QmPlatformsRouter) InitQmPlatformsRouter(Router *gin.RouterGroup) {
	qmPlatformsRouter := Router.Group("qmPlatforms").Use(middleware.OperationRecord())
	qmPlatformsRouterWithoutRecord := Router.Group("qmPlatforms")
	var qmPlatformsApi = v1.ApiGroupApp.QingmaApiGroup.QmPlatformsApi
	{
		qmPlatformsRouter.POST("createQmPlatforms", qmPlatformsApi.CreateQmPlatforms)   // 新建qmPlatforms表
		qmPlatformsRouter.DELETE("deleteQmPlatforms", qmPlatformsApi.DeleteQmPlatforms) // 删除qmPlatforms表
		qmPlatformsRouter.PUT("updateQmPlatforms", qmPlatformsApi.UpdateQmPlatforms)    // 更新qmPlatforms表
	}
	{
		qmPlatformsRouterWithoutRecord.GET("findQmPlatforms", qmPlatformsApi.FindQmPlatforms)       // 根据ID获取qmPlatforms表
		qmPlatformsRouterWithoutRecord.GET("getQmPlatformsList", qmPlatformsApi.GetQmPlatformsList) // 获取qmPlatforms表列表
	}
}
